#!/usr/bin/perl
$n= @ARGV;
for ($i= 0; $i < $n; $i++)
{
    $file= $ARGV[$i];
    open FILE, $file or die "Cannot Open File '$file'\n";

    my $nplay= 0;
    my $nwin= 0;
    my $nstuck= 0;
    my $nabandon= 0;
    my $noff= 0;
    while ($line= <FILE>)
    {
	if ($line =~ / seed (\d+)$/)
	{
	    $seed= $1;
	}
	elsif ($line =~ /^Abandoned!/)
	{
	    print "./binarystar -qP $seed\n";
	}
    }
}
